home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / GFXFX2.ZIP / COPPER2.PAS < prev    next >
Pascal/Delphi Source File  |  1995-02-14  |  931b  |  36 lines

  1.  
  2. program copper; { COPPER2.PAS }
  3. { Pascal version of copper, by Bas van Gaalen }
  4. uses u_vga,u_kb;
  5. const
  6.   pal:array[0..3*28-1] of byte=(
  7.     4,4,2,8,8,4,12,12,6,16,16,8,20,20,10,24,24,12,28,28,14,32,32,16,36,36,
  8.     18,40,40,20,44,44,22,48,48,24,52,52,26,52,52,26,56,56,28,56,56,28,60,
  9.     60,30,60,60,30,60,60,30,63,63,33,63,63,33,63,63,33,63,63,33,63,63,33,
  10.     60,60,30,56,56,28,52,52,26,48,48,24);
  11.  
  12. procedure copperbars;
  13. var l:word; lo,lc,cc:byte;
  14. begin
  15.   asm cli end;
  16.   l:=380; lo:=1;
  17.   vretrace;
  18.   while l<>0 do begin
  19.     lc:=lo; inc(lo); cc:=0;
  20.     while (lc<>0) and (l<>0) do begin
  21.       port[$3c8]:=0;
  22.       port[$3c9]:=pal[cc];
  23.       port[$3c9]:=pal[cc+1];
  24.       while (port[$3da] and 1) <> 0 do;
  25.       while (port[$3da] and 1) = 0 do;
  26.       port[$3c9]:=pal[cc+2];
  27.       inc(cc,3); dec(lc); dec(l);
  28.     end;
  29.   end;
  30.   asm sti end;
  31. end;
  32.  
  33. begin
  34.   repeat copperbars; until keypressed;
  35. end.
  36.